﻿using System;

namespace ProjectEuler
{
    internal class Problem6
    {
        public void Solve()
        {
            var maxNum = 100;

            int sumOfSquares = 1;
            for (var i = 2; i <= maxNum; i++)
            {
                sumOfSquares += (i*i);
            }

            int sum = 0;
            for (int i = 1; i <= maxNum; i++)
            {
                sum += i;
            }

            var squareOfSum = sum*sum;

            var diff = squareOfSum - sumOfSquares;

            Console.WriteLine("problem 6: " + diff);
        }
    }
}